package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchMonitoringParametersMapper;
import com.ruoyi.system.domain.DispatchMonitoringParameters;
import com.ruoyi.system.service.IDispatchMonitoringParametersService;

/**
 * 监测量Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchMonitoringParametersServiceImpl implements IDispatchMonitoringParametersService 
{
    @Autowired
    private DispatchMonitoringParametersMapper dispatchMonitoringParametersMapper;

    /**
     * 查询监测量
     * 
     * @param monitoringParametersId 监测量主键
     * @return 监测量
     */
    @Override
    public DispatchMonitoringParameters selectDispatchMonitoringParametersByMonitoringParametersId(Long monitoringParametersId)
    {
        return dispatchMonitoringParametersMapper.selectDispatchMonitoringParametersByMonitoringParametersId(monitoringParametersId);
    }

    /**
     * 查询监测量列表
     * 
     * @param dispatchMonitoringParameters 监测量
     * @return 监测量
     */
    @Override
    public List<DispatchMonitoringParameters> selectDispatchMonitoringParametersList(DispatchMonitoringParameters dispatchMonitoringParameters)
    {
        return dispatchMonitoringParametersMapper.selectDispatchMonitoringParametersList(dispatchMonitoringParameters);
    }

    /**
     * 新增监测量
     * 
     * @param dispatchMonitoringParameters 监测量
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchMonitoringParameters(DispatchMonitoringParameters dispatchMonitoringParameters)
    {
        return dispatchMonitoringParametersMapper.insertDispatchMonitoringParameters(dispatchMonitoringParameters);
    }

    /**
     * 修改监测量
     * 
     * @param dispatchMonitoringParameters 监测量
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchMonitoringParameters(DispatchMonitoringParameters dispatchMonitoringParameters)
    {
        return dispatchMonitoringParametersMapper.updateDispatchMonitoringParameters(dispatchMonitoringParameters);
    }

    /**
     * 批量删除监测量
     * 
     * @param monitoringParametersIds 需要删除的监测量主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMonitoringParametersByMonitoringParametersIds(Long[] monitoringParametersIds)
    {
        return dispatchMonitoringParametersMapper.deleteDispatchMonitoringParametersByMonitoringParametersIds(monitoringParametersIds);
    }

    /**
     * 删除监测量信息
     * 
     * @param monitoringParametersId 监测量主键
     * @return 结果
     */
    @Override
    public int deleteDispatchMonitoringParametersByMonitoringParametersId(Long monitoringParametersId)
    {
        return dispatchMonitoringParametersMapper.deleteDispatchMonitoringParametersByMonitoringParametersId(monitoringParametersId);
    }
}
